#ifndef WORKDOKUMENT_H_
#define WORKDOKUMENT_H_
#include <QTextDocument>
#include <QTextDocumentFragment>
#include <QTextCursor>
class DocumentManager;


class WorkDokument : public QTextDocument{
Q_OBJECT

public:
	WorkDokument(DocumentManager* parent = 0 );
	virtual ~WorkDokument();

private slots:
	void contentsChange( int pos, int charsRem, int charsAdd);
	void cursorPositionChanged ( const QTextCursor & cursor );
	
private:
	DocumentManager* document_manager;
	
signals:
	void sendTextFragment(int position, int charsRemoved ,const QTextDocumentFragment f);
	
};
#endif /*WORKDOKUMENT_H_*/
